/**
 * 
 */
package edu.hit.irlab.tms.datamapping;

import java.io.Serializable;
import java.util.ArrayList;

/**
 * @author chuter
 *
 */
public class Sentence implements Serializable {
	private static final long serialVersionUID = 1985L;
	private int id;
	private String original;
	private int paragraphId;
	private int startdocumentpos;
	
	private ArrayList<Token> tokens;
	private ArrayList<Sentence> sentences;
//	private HashMap<String, String> nlpresmap;
//	
//	public Sentence() {
//		nlpresmap = new HashMap<String, String>();
//	}
	
	/**
	 * @return the id
	 */
	public int getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(int id) {
		this.id = id;
	}
	/**
	 * @return the original
	 */
	public String getOriginal() {
		return original;
	}
	/**
	 * @param original the original to set
	 */
	public void setOriginal(String original) {
		this.original = original;
	}

	/**
	 * @return the tokens
	 */
	public ArrayList<Token> getTokens() {
		return tokens;
	}
	/**
	 * @param tokens the tokens to set
	 */
	public void setTokens(ArrayList<Token> tokens) {
		this.tokens = tokens;
	}

	/**
	 * @return the beginTokenId
	 */
	public int getBeginTokenId() {
		try {
			return tokens.get(0).getId();
		} catch (NullPointerException e){
			e.printStackTrace();
		}
		
		return -1;
	}
	
	/**
	 * @return the endTokenId
	 */
	public int getEndTokenId() {
		return getBeginTokenId() + tokens.size() - 1;
	}
		
	public int getParagraphId() {
		return paragraphId;
	}
	
	public void setParagraphId(int paragraphId) {
		this.paragraphId = paragraphId;
	}	

	/** set the inner small sentences of the sentence */
	public void setinnersentences(ArrayList<Sentence> innersentences) {
		sentences = innersentences;
	}
	
	/** get the inner small sentences of the sentence */
	public ArrayList<Sentence> getinnersentences() {
		return sentences;
	}
	
	/** Set the pos in the document of the last word of the sentence */
	public void setstartdocumentpos(int pos) {
		startdocumentpos = pos;
	}
	
	/** Get the pos in the document of the last word of the sentence */
	public int getstartdocumentpos() {
		return startdocumentpos;
	}

//	/**
//	 * Set the result from the specific nlp basic tool
//	 * 
//	 * @param toolname
//	 * @param resval
//	 */
//	public void setnlpres(String toolname, String resval) {
//		nlpresmap.put(toolname, resval);
//	}
//	
//	/**
//	 * Get the specific nlp result by giving the name
//	 * @param resname
//	 * @return
//	 */
//	public String getnlpres(String toolname) {
//		return nlpresmap.get(toolname);
//	}
	
	
}
